package com.jixi.controller;

import com.jixi.common.result.Result;
import com.jixi.pojo.vo.ClassDetailVo;
import com.jixi.service.ClassesService;
import com.jixi.service.OrderDailyService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;

@Slf4j
@Tag(name = "查询管理班级详情")
@RestController
@RequestMapping("/teacher/class")
public class ClassesController {
    @Autowired
    private ClassesService classesService;
    @Autowired
    private OrderDailyService orderDailyService;
    /**
     * 查询管理班级详情
     *
     * @return 班级名称，该班用餐人数
     * */
    @GetMapping("/detail")
    @Operation(summary = "查询管理班级详情")
    public Result getClassDetail(){
        //根据班主任id查询
        List<ClassDetailVo> list = classesService.getClassOrderDetail();
        //返回
        return Result.success(list);
    }

}
